define(['./WebPDF', './ToolHandlerManager'], function(WebPDF, ToolHandlerManager) {
	'use strict';
	var PDFApiProvider = function(pdfViewer) {			
		this.gotoPage = function(data) {
			WebPDF.gotoPage(data);
		};
		this.nextPage = function(data) {
			WebPDF.nextPage(data);
		};
		this.previousPage = function(data) {
			WebPDF.previousPage(data);
		};

		this.setCurrentToolByName = function(toolName) {
			ToolHandlerManager.setCurrentToolByName(toolName);
		};
		this.setCurPage = function(data) {
			pdfViewer.trigger("curPageChanged", [data]);
		};
		this.curPageChanged = function(callback) {
			if (typeof callback == "function") {
				pdfViewer.bind("curPageChanged", callback);
			}
		};

		this.setPageCount = function(data) {
			pdfViewer.trigger("pageCountChanged", [data]);
		};
		this.pageCountChanged = function(callback) {
			if (typeof callback == "function") {
				pdfViewer.bind("pageCountChanged", callback);
			}
		};

		this.setScale = function(data) {
			pdfViewer.trigger("scaleChanged", [data]);
		};
		this.scaleChanged = function(callback) {
			if (typeof callback == "function") {
				pdfViewer.bind("scaleChanged", callback);
			} 
		};
	};
	
	return PDFApiProvider;
});